package user;

import book.BookList;
import operation.*;

import java.util.Scanner;
import java.util.ServiceConfigurationError;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-17
 * Time: 8:53
 */
public class NornmalUser extends User{


    public NornmalUser(String name) {
        super(name);
        this.dooperation = new Operation[]{
                new ExitOperation(),
                new SearchOperation(),
                new LendOperation(),
                new ReturnOperation(),
                new DisplayOperation()
        };
    }

    @Override
    public int menu() {
        System.out.println("==========普通用户菜单=========");
        System.out.println("1. 查找书籍");
        System.out.println("2. 借阅书籍");
        System.out.println("3. 归还书籍");
        System.out.println("4. 显示书籍");
        System.out.println("0. 退出系统");
        System.out.println("请选择操作：");
        Scanner scan = new Scanner(System.in);
        int choice = scan.nextInt();
        return choice;
    }

}
